package com.ruoyi.orderEat.mapper;

import com.ruoyi.orderEat.domain.OrderAssociated;
import com.ruoyi.orderEat.domain.ShopCart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderAssociatedMapper {
    int deleteByPrimaryKey(Long orderAssociatedId);

    int insert(OrderAssociated record);

    void insertBatch(@Param("orderAssociatedList") List<OrderAssociated> orderAssociatedList);

    int insertSelective(OrderAssociated record);

    OrderAssociated selectByPrimaryKey(Long orderAssociatedId);

    /**
     * 查询订单详情
     * **/
    List<ShopCart> getShopCartList(Long orderId);

    int deleteByOrderIds(Long[] orderIds);

    /**
     * 根据订单ID删除关联信息
     * **/
    int deleteByOrderId(@Param("orderId")Long orderId);





    List<OrderAssociated> selectByOrderId(@Param("orderId")Long orderId);


    int updateByPrimaryKeySelective(OrderAssociated record);

    int updateByPrimaryKey(OrderAssociated record);
}